package com.krlin.soccer.soccer.controller;

import com.krlin.soccer.soccer.entity.Judge;
import com.krlin.soccer.soccer.service.JudgeService;
import com.krlin.soccer.soccer.tools.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class JudgeController {


    @Autowired
    JudgeService judgeService;

    @GetMapping("/judges")
    public Result judges() {
        List<Judge> judges = judgeService.getAllJudges();
        return Result.succ(judges);
    }
}
